package com.atguigu.cloud.user.service.impl;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.atguigu.cloud.user.entity.User;
import com.atguigu.cloud.user.mapper.UserMapper;
import com.atguigu.cloud.user.service.UserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * @author Taeyang
 * @date 2025/4/4
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    /**
     * 查询用户
     * 注解 @SentinelResource("users") 在Sentinel链路中暴露出来或者说被监控，不添加value值在Sentinel中会显示全路径
     */
    @Override
    @SentinelResource("users")
    public void queryUsers(String param) {
        System.err.println(param + "：查询用户");
    }
}
